//
//  KFDAnnouncementListViewModel.m
//  
//
//  Created by JIRENTIANXIANG on 6/23/15.
//
//

#import "KFDAnnouncementListViewModel.h"
#import "KFDClient.h"

@implementation KFDAnnouncementListViewModel

-(void)loadAnnouncementListWithCompletionHandler:(KFDViewModelLoadDataCompletionHandler)completionHandler
{
    KFDClient* client=[KFDClient sharedClient];
    [client getAnnouncementListWithMaxCount:20 page:1 successHandler:^(NSArray *announcementList) {
        self.announcementList=announcementList;
        if (completionHandler) {
            completionHandler(YES);
        }
    } failureHandler:^(KFDResponseBody *response) {
        if (completionHandler) {
            completionHandler(NO);
        }
    }];
}

@end
